package com.jumi.microservice.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jumi.microservice.domain.Department;
import com.jumi.microservice.domain.temp.DepartmentTemp;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 部门管理mapper组件
 *
 * @author Administrator
 */
public interface DepartmentMapper extends BaseMapper<Department> {

    List<DepartmentTemp> selectParentDep(@Param("id") Long id);

    List<DepartmentTemp> selectParentDeps(@Param("id") Long id);

    List<Long> getSonDepartment(@Param("id") Long id);

    List<Long> getFatherDepartment(@Param("id") Long id);

    int updateSonDepartmentStatus(@Param("dep")DepartmentTemp temp);
}
